/**
 * 
 */
package bancosys.tec.persist.hibernate;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

import bancosys.tec.persist.bussobj.PersistableBusinessObject;

/**
 * Classe com elementos lazy usada para testes.
 * 
 * @author joao
 */
@Entity
public class Associador extends PersistableBusinessObject {

    private Long id;

    private Associacao associacao1;

    private Associacao associacao2;

    /**
     * @return the id
     */
    @Id
    @GeneratedValue
    public Long getId() {
        return this.id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return the associacao1
     */
    @ManyToOne(fetch = FetchType.LAZY)
    public Associacao getAssociacao1() {
        return this.associacao1;
    }

    /**
     * @param associacao1 the associacao1 to set
     */

    public void setAssociacao1(Associacao associacao1) {
        this.associacao1 = associacao1;
    }

    /**
     * @return the associacao2
     */
    @ManyToOne(fetch = FetchType.LAZY)
    public Associacao getAssociacao2() {
        return this.associacao2;
    }

    /**
     * @param associacao2 the associacao2 to set
     */
    public void setAssociacao2(Associacao associacao2) {
        this.associacao2 = associacao2;
    }
}
